home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / vdtj122b.zip / DEMO10.VDM < prev    next >
Text File  |  1992-11-30  |  3KB  |  90 lines

  1. RI(9)/VEDIT and VEDIT PLUS - Multiple File Processing/
  2. M(H)
  3.  
  4. YT/
  5. VEDIT can easily perform the same editing operation on a whole group of
  6. files.  For example, you might want to see which files contain a particular
  7. word (such as a program variable name).  Or you might discover that you have
  8. consistently misspelled the same word in twenty files.  Or you might want to
  9. print an entire group of files.
  10.  
  11. These and similar operation are easily performed in VEDIT and VEDIT PLUS using
  12. the supplied macro "WILDFILE.VDM".  As its name implies, the group of files
  13. may either be specified individually or using the wildcards "*" and "?".
  14.  
  15. This demo will first have you search for all occurrences of a word in all the
  16. text files on this demo disk.  It will then have you display the beginning
  17. of each text file.
  18.  
  19. /
  20.  
  21. M(K)
  22. 8XS(100)        !Need 8 line window
  23. M(W)            !Create instruction window; set attributes
  24. B #K            !Empty edit buffer
  25. +RL(P) wildfile.vdm    !Load macro
  26.  
  27. EE(1)
  28. B #K
  29. I\To search through all text files enter "*.TXT" for the first prompt, and
  30. press <Enter> twice.  At the "Execute..." prompt press "S".  At the search
  31. prompt type "programs" and press <Enter>.
  32.  
  33. At the "Display line..." prompt press "V" to enter editing mode.
  34. Alternatively, you could just display the line.
  35.  
  36. Press <Enter> to start.  \
  37.  
  38. B -V
  39.  
  40. EE(Y) EQY
  41. EE(@)
  42. YWS(@)            !Let WILDFILE run in default window
  43.  
  44. M(P)            !Execute the macro
  45.  
  46. YWI YWB(1) 8
  47. Q26YEA            !Set editing attribute
  48. YWS(1) Q27YEA        !Set attribute in lower window "1"
  49. EE(1)
  50. B #K
  51. I/To display the beginning of the text files enter "*.TXT" for the first
  52. prompt, and press <Enter> twice.  At the "Execute..." prompt press "C" to
  53. execute a command.  At the command prompt enter:
  54.  
  55.     11T
  56.  
  57. This will display the first 11 lines in each file.  At the next prompt
  58. press "Y" to pause the screen display after each file. /
  59.  
  60. B-V
  61.  
  62. EE(@)
  63. YWS@
  64. M(P)
  65.  
  66. RI(9)/VEDIT PLUS - Multiple File Processing/
  67. M(H)
  68.  
  69. YT\
  70. Obviously, many other useful operations can be performed using the WILDFILE
  71. macro.  (It is more flexible than the similar UNIX "grep" function.)
  72.  
  73. Although outside the scope of this demo, you could create a file containing
  74. numerous search and replace commands.  The WILDFILE macro could then
  75. automatically perform the entire list of search and replace operations on an
  76. entire group of files.
  77.  
  78. After finishing this demo you might want to try the WILDFILE macro on your own
  79. text or program files.  Try it to see how fast VEDIT can search!  (VEDIT is
  80. the fastest editor available for performing search/replace in multi-megabyte
  81. files.)
  82.  
  83. After running "VDEMO", you can startup WILDFILE by selecting it from the
  84. {MISC} pull-down menu.  Or you can start it up from DOS with the command:
  85.  
  86.     VDEMO -X WILDFILE
  87. \
  88.  
  89. M(K)
  90.